﻿using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YDT_ConfigCentor.ConfigCentors
{
    /// <summary>
    /// 分布式配置封装
    /// </summary>
    public static class NacosDistributedConfigWebApplicationBuilderExtenions
    {
        public static WebApplicationBuilder AddDistributedConfig(this WebApplicationBuilder builder) 
        {
            var Configuration = builder.Configuration;
            Configuration.AddNacosV2Configuration(Configuration.GetSection("DistributedConfig:Nacos"));

            return builder;
        }
    }
}
